package com.cwm.producer;

import lombok.AllArgsConstructor;
import org.springframework.cloud.stream.function.StreamBridge;
import org.springframework.stereotype.Service;

@Service
@AllArgsConstructor
public class SmsProducerService {
 
	private final StreamBridge streamBridge;
 
	/**
	 * 采用StreamBridge的发送方式
	 *
	 * @param message 　短消息
	 */
	public void sendSms(String message) {
		streamBridge.send("sms-out-0", message);
	}
}